<?php

namespace app\scm\controller;

use app\admin\common\Base;
use app\admin\common\Order;
use think\Db;
use app\admin\model\Order as Model;
use app\scm\model\InvpuGoods as GoodsModel;
use app\scm\model\PurchaseSalesList as PSLModel;

class Invre extends Base
{
    public function index()
    {
        $data = $this->request->param();
        return (new Order) -> order_index($data,5); //所属类型 0，销售订单；1，销售单；2，退货单;3,购货订单，4，购货单，5，购货退货单  
    }


    public function add()
    {
        $data = $this->request->param();
        return (new Order) -> order_add($data,5);//订单类别;0,销售订单，1，销售单，2，销售退货单，3,购货订单，4，购货单，5，购货退货单
    }

    //编辑栏目1-1
    public function edit()
    {
       $data = $this->request->param();
       return (new Order) -> order_edit($data,5);//订单类别;0,销售订单，1，销售单，2，销售退货单，3,购货订单，4，购货单，5，购货退货单
    }
    //编辑栏目1-2
    public function save()
    {
        $data = $this->request->param();
        return (new Order) -> order_save($data,5);//订单类别;0,销售订单，1，销售单，2，销售退货单，3,购货订单，4，购货单，5，购货退货单
    }

    //审核与反审核
    public function shenhe($ids,$type)
    {
        $data = $this->request->param();
        return (new Order) -> order_shenhe($ids,$type,5);//订单类别;0,销售订单，1，销售单，2，销售退货单，3,购货订单，4，购货单，5，购货退货单
    }

    //对单与反撤销对单
    public function dd()
    {
        $data = $this->request->param();
        return (new Order) -> order_dd($data);
    }

     //编辑更新订单
    public function update()
    {
        $data = $this->request->param();
        return (new Order) -> order_update($data);
    }

    //删除
    public function del()
    {
       $data = $this->request->param();
       return (new Order) -> order_del($data);
    }
}
